<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html>
    <head>
        <title>添加商品</title>
        <meta http-equiv="content-type" content="text/html;charset=utf-8">
        <link href="__PUBLIC__/css/mine.css" type="text/css" rel="stylesheet">
    </head>

    <body>

        <div class="div_head">
            <span>
                <span style="float:left">当前位置是：分配权限->{$role['role_name']}</span>
                <span style="float:right;margin-right: 8px;font-weight: bold">
                    <a style="text-decoration: none" href="__CONTROLLER__/showlist">【返回】</a>
                </span>
            </span>
        </div>
        <div></div>

        <div style="font-size: 13px;margin: 10px 5px">
            <form action="{:U('Admin/Role/distribute')}" method="post" enctype="multipart/form-data">
                <input type="hidden" name="role_id" value="{$role['role_id']}" />
                <table border="1" width="100%" class="table_a">
                    <foreach name="infoA" item="a">
                        <tr>
                       
                            <td width="18%"><input type='checkbox' name='auth_id[]'value="{$a['auth_id']}"
                                                   <if condition="in_array($a['auth_id'],$have_ids)">checked='checked'</if>
                                                   />{$a['auth_name']}</td>
                            <td>
                                    <foreach name="infoB" item="b">
                                        <if condition="$b['auth_pid'] eq $a['auth_id']">
                                            <div style="width:200px;float:left;"><input type='checkbox' name='auth_id[]' value="{$b['auth_id']}"
                                                                                        <if condition="in_array($b['auth_id'],$have_ids)">checked='checked'</if>
                                                                                        />{$b['auth_name']}</div>
                                        </if>    
                                    </foreach>    
                            </td>
                        </tr>
                    </foreach>    
                </table>
                <input type="submit" value="分配权限" />
            </form>
        </div>
    </body>
</html>